package jisuanke;

import java.util.Scanner;

public class 判断质数 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        function(n);
    }

    public static void function(int n){
        if(n==2){
            System.out.println(true);
            return;
        }
        if(n<2){
            System.out.println(false);
            return;
        }
        for(int i=2;i<=n/2;i++){
            if(n%i == 0){
                System.out.println(false);
                return;
            }
        }
        System.out.println(true);
        return;
    }
}
